package com.gemme.gemme.util;

import android.content.Context;
import android.content.SharedPreferences;

import com.gemme.gemme.login.Constant;

/**
 * @Author: yangcheng
 * @CreateDate: 2020/7/24 9:21
 */
public class SPUtil {
    public static void PutData(Context context,String key,String value){
        SharedPreferences MSP = context.getSharedPreferences(Constant.MSP, Context.MODE_PRIVATE);
        MSP.edit().putString(key, value).apply();
    }

    public static String getDataForString(Context context,String key,String defvalue){
        SharedPreferences MSP = context.getSharedPreferences(Constant.MSP, Context.MODE_PRIVATE);
        return MSP.getString(key, defvalue).trim();
    }
}
